//
//  HomePageBaseModel.m
//  STL_ Animation
//
//  Created by DJtd on 16/3/30.
//  Copyright © 2016年 STL. All rights reserved.
//

#import "HomePageBaseModel.h"

@implementation HomePageBaseModel

- (instancetype)initWithDataSource:(NSDictionary *)dataSource
{
    self = [super init];
    if (self) {
        
        [self setValuesForKeysWithDictionary:dataSource];
        
        NSMutableArray *array = [NSMutableArray arrayWithCapacity:0];
        
        for (NSDictionary *dic in self.artists) {
            HomePageArrayModel *model = [[HomePageArrayModel alloc] initWithDataSource:dic];
            
            [array addObject:model];
        }
        self.artists = [NSArray arrayWithArray:array];
    }
    return self;
}

- (void)setValue:(id)value forUndefinedKey:(NSString *)key {
    if ([key isEqualToString:@"id"]) {
        __id = value;
    }
    if ([key isEqualToString:@"description"]) {
        _descriptionModel = value;
    }
}

@end
